package tests

import (
	"github.com/zw2582/ginlib"
	"path"
	"runtime"
	"szxf/models"
)

func init()  {
	_, fullFilename, _, _ := runtime.Caller(0)
	projectDir := path.Dir(path.Dir(fullFilename))

	//初始化ini配置
	ginlib.InitIni(path.Join(projectDir, "conf/app.ini"))

	//初始化日志
	ginlib.InitLogger()

	//初始化redis
	ginlib.InitRedis()

	//初始化数据库
	//db := models.InitDb()
	models.InitDb()

	//同步表结构
	//if err := ginlib.XormSync(db); err != nil {
	//	return
	//}
}